package com.xlhl.init.model.vo;

import cn.hutool.core.bean.BeanUtil;
import com.xlhl.init.model.entity.RoleAssociationPermission;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serial;
import java.io.Serializable;

/**
 * @author xlhl
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class RoleAssociationPermissionVO implements Serializable {
    @Serial
    private static final long serialVersionUID = 2849103354244558766L;

    /**
     * ID
     */
    private Long id;

    /**
     * 权限主项ID，也就是权限表中 对应的 father_id
     */
    private Long permissionMainId;

    /**
     * 角色对应主项下的所有权限位图
     */
    private Long permission;

    public RoleAssociationPermissionVO(RoleAssociationPermission roleAssociationPermission) {
        BeanUtil.copyProperties(roleAssociationPermission, this);
    }
}
